package com.wanbangee.marksystem.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.wanbangee.marksystem.entities.MAnswerSheetRecord;
import com.wanbangee.marksystem.service.ISpecialTestService;


/**
 * 特殊卷处理 控制层
 * 特殊卷
 * 		- 问题卷：1 
 * 		- 优秀卷：2
 * 		- 典型错误卷：3
 * 		- 已处理问题卷：4
 * 其他卷
 * 		- 正常卷：0
 * @author 小粥愚
 *
 */
@RestController
public class SpecialTestController {
	@Autowired
	private ISpecialTestService specialTestService;
	
	
	/**
	 * 查询出指定特殊卷信息，用于插入答题记录表   (测试结果：✔)
	 * @param examId
	 * @param examSubId
	 * @param markerId
	 * @param scoreId
	 * @param addUserId
	 * @param addNm
	 * @return
	 */
	@GetMapping("/exam-score/setting/specialTestInfo")
	public MAnswerSheetRecord specialTestInfo(Integer examId,Integer examSubId,Integer markerId,Integer scoreId,Integer addUserId, String addNm){
		return this.specialTestService.specialTestInfo(examId, examSubId, markerId, scoreId,addUserId,addNm);
	}
	
	/**
	 * 新增新的特殊卷		(测试结果：✔)
	 * @param sheet 特殊卷
	 * @param recordId 记录类型 
	 * @return 
	 */
	@PostMapping("/exam-score/setting/addSpecialTest")
	public Boolean addSpecialTest(@RequestBody MAnswerSheetRecord sheet,@RequestParam("recordId")Long recordId){
		return this.specialTestService.addSpecialTest(sheet, recordId);
	}
	
}

















